<?php

namespace app\model;

use app\BaseModel;
use think\model\relation\BelongsTo;

/**
 * 系统日志
 */
class LogModel extends BaseModel
{
    protected $name = 'log';

    /**
     * 用户名称
     * @return BelongsTo
     */
    public function userName(): BelongsTo
    {
        return $this->belongsTo('UserModel','uid')->bind([
            'user_name'=>'name'
        ]);
    }
}